C:/Program Files>Example.exe
|
|
I only have the one for now. You do not need the errhandler if you set Debug to 1
|
This sould tack and image like the one in the screen shot.
|
Also I just copied this code out of my test program it may have bugs in it
|
#include "CaptureDll.h"
|
CaptureDll *dcs = new CaptureDll();
|
POINTXY pt;
|
dcs->Debug(1);
|
if(!dcs->DllInit(hWnd))
errhandler("Init Failed") ;
|
if(!dcs->SetImageType(IM_JPEG_LLOW))
errhandler("Image Type") ;
|
dcs->SetFileName("test2.jpeg");
|
pt.height = 400;
pt.width = 400;
|
if(!dcs->SetCanvasSize(pt))
errhandler("Canvas Size") ;
|
pt.height = 200;
pt.width = 200;
|
if(!dcs->SetSnapShotSize(pt))
errhandler("SnapShot Size") ;
|
pt.height = 200;
pt.width = 200;
|
if(!dcs->SetSnapPosition(pt))
errhandler("SnapPosition Size");
|
pt.height = 0;
pt.width = 0;
|
if(!dcs->SetBackPosition(pt))
errhandler("BackPosition Size");
|
if(!dcs->CaptureImage())
errhandler("Take CaptureImage ERROR!");
|
pt.height = 100;
pt.width = 100;
|
if(!dcs->SetBackPosition(pt))
errhandler("BackPosition Size");
|
if(!dcs->AddImage())
errhandler("add Image ERROR!");
|
pt.height = 200;
pt.width = 200;
|
if(!dcs->SetBackPosition(pt))
errhandler("BackPosition Size");
|
pt.height = 300;
pt.width = 300;
|
if(!dcs->SetSnapPosition(pt))
errhandler("SnapPosition Size");
|
if(!dcs->AddImage())
errhandler("Add Image ERROR!" );
|
if(!dcs->SaveImage())
errhandler("Save ERROR!") ;
|
dcs->Version();
|
delete dcs;
|
A Mouse Hook Callback Example For CaptureDll use the main window callback
|
case UWM_MOUSEMOVE:
|
po = (POINTXY *)lParam;
point.x = po->height;
point.y = po->width;
|
switch(wParam)
{
|
case WM_LBUTTONDOWN:
// do something
break;
|
case WM_MOUSEWHEEL:
// do something
break;
|
case WM_RBUTTONDOWN:
// do something
break;
|
case WM_LBUTTONUP:
// do something
break;
|
case WM_RBUTTONUP:
// do something
break;
|
default:
}
break;
|